package com.google.code.customercare.common;

public class Constants {
	// user_key giu username
	public static final String USER_KEY = "user";
	public static final String ID_KEY = "id";
	public static final String URL_ENCODER = "UTF-8";
	public static final String NULL = "null";
	
	public static final int TOKEN_LENGTH = 10;
	
	
	public static String getStandardPN(String phoneNum) {
		if (phoneNum == null)
			return phoneNum;
		String result = "";
		if (phoneNum.startsWith("0")) {
			result = "84" + phoneNum.substring(1);
		} else if (phoneNum.startsWith("+84")) {
			result = phoneNum.substring(1);
		} else if (phoneNum.startsWith("84")) {
			result = phoneNum;
		} else
			result = "84" + phoneNum;
		return result;
	}
}
